﻿/* * * * * * * * * * * * * * * * * * * * * * * * * * * 
 * 作者：何沣道
 * 日期：2012-09-03
 * 描述：定义单例实现模块
 * * * * * * * * * * * * * * * * * * * * * * * * * * */

namespace Hfabase.Collections
{

    /// <summary>
    /// 单例实例 模块
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public class Singleton<T> where T : class , new()
    {
        private static T instance = new T();

        /// <summary>
        /// 全局实例
        /// </summary>
        public static T Instance
        {
            get
            {
                return instance;
            }
        }
    }
}
